package com.payment.service.impl;

import com.payment.entity.common.Partner;
import com.payment.mapper.PartnerMapper;
import com.payment.service.PartnerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional
@Service
public class PartnerServiceImpl implements PartnerService {
    @Resource
    PartnerMapper partnerMapper;

    @Override
    public int findPartnerCodeEixtOrNot(String partnerCode) {
        return partnerMapper.findPartnerCodeEixtOrNot(partnerCode);
    }

    @Override
    public void insertPartner(Partner partner) {
        partnerMapper.insertPartner(partner);
    }

    @Override
    public String findSecretByPartnerCode(String partnerCode) {
        return partnerMapper.findSecretByPartnerCode(partnerCode);
    }

    @Override
    public List<Partner> findPartnerCode() {
        return partnerMapper.findPartnerCode();
    }

    @Override
    public String findTokenByPartnerCode(String partnerCode) {
        return partnerMapper.findTokenByPartnerCode(partnerCode);
    }
}
